//
//  SortListSecondCell.m
//  QuicklyPlay
//
//  Created by 你的温柔是我唯一沉溺 on 15/11/2.
//  Copyright © 2015年 OPteam. All rights reserved.
//

#import "SortListSecondCell.h"

@interface SortListSecondCell ()

@property (weak, nonatomic) IBOutlet UIImageView *SortListImageView;
@property (weak, nonatomic) IBOutlet UILabel *TitleLB;

@property (weak, nonatomic) IBOutlet UILabel *upTimeLB;
@property (weak, nonatomic) IBOutlet UILabel *digsLB;


@end


@implementation SortListSecondCell



- (void)setVideoModel:(VideosModel *)videoModel {
    
    self.boredLB.layer.borderColor = [[UIColor lightGrayColor] CGColor];
    self.boredLB.layer.borderWidth = 0.5;
    
    
    [self.SortListImageView sd_setImageWithURL:[NSURL URLWithString:videoModel.img_url]];
    
    NSTimeInterval time = [videoModel.publish_time doubleValue];
    NSDate *date = [NSDate dateWithTimeIntervalSince1970:time];
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"YYYY-MM-dd"];
    NSString *dateString = [formatter stringFromDate:date];
    NSString *timeString = [NSString stringWithFormat:@"发布: %@", dateString];
    
    self.upTimeLB.text = timeString;
    self.TitleLB.text = videoModel.title;
    

    
    NSString *digs = [NSString stringWithFormat:@"%@个人点赞", videoModel.digs];
    self.digsLB.text = digs;
    
    
    
}


- (void)setCollectionModel:(VideosModel *)collectionModel {
    
    self.boredLB.layer.borderColor = [[UIColor lightGrayColor] CGColor];
    self.boredLB.layer.borderWidth = 0.5;

    [self.SortListImageView sd_setImageWithURL:[NSURL URLWithString:collectionModel.img_url]];
    self.TitleLB.text = collectionModel.title;

}


- (void)awakeFromNib {


}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    

}

@end
